extends Node

const MAX_SAFE_INTEGER= 900_719_925_474_0991

const SkillAttrKey = {
	"id": "id", # 唯一编号
	"level": "level", # 技能等级
	"critLevel":"critLevel",#暴击配置 -1 必定暴击
	"cooldown": "cooldown", # 普通模式下的冷却时间或冷却回合
	"castPreDelay": "castPreDelay", # 前摇-延迟执行时间， 毫秒数
	"targetReSelect": "targetReSelect", # 目标死亡后是否重新选择目标
	"castAfterDelay": "castAfterDelay", # 后摇-播放显示时间， 毫秒数
	"BuffID": "BuffID", # 技能包含的buffIDs的后缀
	"hitRate": "hitRate", # 命中几率的公式或值
	"targetType": "targetType", # 技能内置的命中目标类型
	"targetTypeArgs": "targetTypeArgs", # 技能内置的命中目标类型的参数
}


const ActionState = {
	"none": "none",  			#
	"interval": "interval",  	# interval event
	"round": "round",  			# round event
	"cast": "cast",  			# cast skill
	"beCast": "beCast",  		# be cast skill
	"hit": "hit",  				# hit target
	"beHit": "beHit",  			# be hit
	"miss": "miss",  			# 
	"dodge": "dodge",  			#
}

const BuffFireType = ActionState

const DamageActionState = {
	calcDamage =      "calcDamage", # 伤害计算
	beCalcDamage=     "beCalcDamage", # 被伤害计算
	damage=     "damage", # 伤害后
	beDamage=     "beDamage", # 被伤害后
	kill=     "kill", # 杀死
	dead=     "dead" # 死亡
};


# buff的属性键
const BuffAttrKey = {
	"id": "id", #唯一编号
	"fireType": "fireType", #激发类型
	"fireCondition": "fireCondition", #激发条件
	"fireMaxTimes": "fireMaxTimes", #激发最大次数， 激发次数等于最大次数会执行离场效果
	"cooldown": "cooldown", #激发冷却时间， 如果是时间间隔激发，则为激发间隔时间
	"addup": "addup", #累加N次后才进行激发
	"liveTime": "liveTime", #生命周期， 仅在事件激发的buff生效， 为0或undefined表示永久生效
	"upEffectFunc": "upEffectFunc", #进场效果计算函数
	"upEffectType": "upEffectType", #进场效果类型
	"upEffectArgs": "upEffectArgs", #进场效果计算的参数
	"fireEffectFunc": "fireEffectFunc", #激发效果计算函数
	"fireEffectType": "fireEffectType", #激发效果类型
	"fireEffectArgs": "fireEffectArgs", #激发效果计算的参数
	"downEffectFunc": "downEffectFunc", #离场效果计算函数， 离场指激发次数到达最大次数
	"downEffectType": "downEffectType", #离场效果类型
	"downEffectArgs": "downEffectArgs", #离场效果计算的参数
	"closeEffectFunc": "closeEffectFunc", #关闭效果计算函数， 关闭指被驱散或生命周期到期
	"closeEffectType": "closeEffectType", #关闭效果类型
	"closeEffectArgs": "closeEffectArgs", #关闭效果计算的参数
}


enum BuffActionType {
	up = 1,
	fire = 2,
	down = 3,
	close = 4,
}


enum ActionBuffType {
	add = 1, # 1为添加
	down, # 2为次数到删除
	timeout, # 3为生命周期到删除， -2为驱散删除
	clear,# 4为驱散删除
}



const TargetType = {
	base = 100, # 基础目标
	"self" :   1, # 自己
	friendAll=     11, # 友军全部，不包括自己
	friendMinHp=        12, # 友军中血量最少的
	friendMaxHp=        13, # 友军中血量最大的
	friendNear=        14, # 距离自己最近的友军
	friendRound=        15, # 自己多少米范围内的友军
	friend1=     21, # 友军随机1个
	friend2=     22, # 友军随机2个
	friend3=     23, # 友军随机3个
	friendN=     29, # 友军随机N个
	ownSideAll=     31, # 己方全部，包括自己
	ownSideMinHp=        32, # 己方中血量最少的
	ownSideMaxHp=        33, # 己方中血量最大的
	ownSide1=     41, # 己方随机1个
	ownSide2=     42, # 己方随机2个
	ownSide3=     43, # 己方随机3个
	ownSideN=     49, # 己方随机N个
	enemyAll=      51, # 敌人全部
	enemyMinHp=        52, # 敌人中血量最少的
	enemyMaxHp=        53, # 敌人中血量最大的
	enemyNear=        54, # 距离自己最近的敌人
	enemyRound=        55, # 自己多少米范围内的敌人
	enemy1=        61, # 敌人随机1个
	enemy2=        62, # 敌人随机2个
	enemy3=        63, # 敌人随机3个
	enemyN=        69, # 敌人随机N个
}
